// Decompiled on 周六 2月 22 19:31:49 CST 2025 with Zomboid Decompiler v0.1.3 using Vineflower.
package zombie.vehicles;

public class VehicleInterpolationData implements Comparable<VehicleInterpolationData> {
    protected long time;
    protected float x;
    protected float y;
    protected float z;
    protected float qx;
    protected float qy;
    protected float qz;
    protected float qw;
    protected float vx;
    protected float vy;
    protected float vz;
    protected float engineSpeed;
    protected float throttle;
    protected short wheelsCount = 4;
    protected float[] wheelSteering = new float[4];
    protected float[] wheelRotation = new float[4];
    protected float[] wheelSkidInfo = new float[4];
    protected float[] wheelSuspensionLength = new float[4];

    protected void setNumWheels(short _short) {
        if (_short > this.wheelsCount) {
            this.wheelSteering = new float[_short];
            this.wheelRotation = new float[_short];
            this.wheelSkidInfo = new float[_short];
            this.wheelSuspensionLength = new float[_short];
        }

        this.wheelsCount = _short;
    }

    void copy(VehicleInterpolationData vehicleInterpolationData0) {
        this.time = vehicleInterpolationData0.time;
        this.x = vehicleInterpolationData0.x;
        this.y = vehicleInterpolationData0.y;
        this.z = vehicleInterpolationData0.z;
        this.qx = vehicleInterpolationData0.qx;
        this.qy = vehicleInterpolationData0.qy;
        this.qz = vehicleInterpolationData0.qz;
        this.qw = vehicleInterpolationData0.qw;
        this.vx = vehicleInterpolationData0.vx;
        this.vy = vehicleInterpolationData0.vy;
        this.vz = vehicleInterpolationData0.vz;
        this.engineSpeed = vehicleInterpolationData0.engineSpeed;
        this.throttle = vehicleInterpolationData0.throttle;
        this.setNumWheels(vehicleInterpolationData0.wheelsCount);

        for (int _int = 0; _int < vehicleInterpolationData0.wheelsCount; _int++) {
            this.wheelSteering[_int] = vehicleInterpolationData0.wheelSteering[_int];
            this.wheelRotation[_int] = vehicleInterpolationData0.wheelRotation[_int];
            this.wheelSkidInfo[_int] = vehicleInterpolationData0.wheelSkidInfo[_int];
            this.wheelSuspensionLength[_int] = vehicleInterpolationData0.wheelSuspensionLength[_int];
        }
    }

    public int compareTo(VehicleInterpolationData o) {
        return Long.compare(this.time, o.time);
    }
}
